/**
 * 
 */
package com.fitbet.admin.visitor.impl;


import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.fitbet.admin.service.DataService;
import com.fitbet.entity.user.User;

/**
 * 
 * @author dan
 *
 */
@Component("persistentVisitor")
public class PersistentVisitor {
    
    private static final Logger logger = LoggerFactory.getLogger(PersistentVisitor.class);
    
    @Autowired
    @Qualifier("dataService")
    private DataService<User> userService;
    
    /**
     * @return
     */
    public List<User> getUsers(){
        
        logger.debug("#getUser() - get user from database");
        
        List<User> users = userService.listAll(User.class);
        
        return users;
    }
    
}
